//
//  StatusNormalCell.swift
//  weibo
//
//  Created by 陈伟 on 15/10/22.
//  Copyright © 2015年 陈伟. All rights reserved.
//

import UIKit

class StatusNormalCell: StatusCell {
    
    override var statusModel: StatusViewModel? {
        didSet {
            pictureView.snp_updateConstraints { (make) -> Void in
//                make.width.equalTo(pictureView.bounds.width)
//                make.height.equalTo(pictureView.bounds.height)
//                make.right.equalTo(contentView.snp_right).offset(-statusCellMargin)
                let offset = statusModel?.thumbnailUrls?.count > 0 ? statusCellMargin : 0
                make.top.equalTo(statusTextLabel.snp_bottom).offset(offset)
            }
        }
    }
    
    override func setupUI() {
        super.setupUI()
            pictureView.snp_makeConstraints { (make) -> Void in
                make.top.equalTo(statusTextLabel.snp_bottom).offset(statusCellMargin)
                make.left.equalTo(statusTextLabel.snp_left)
                make.width.equalTo(300)
                make.height.equalTo(90)
            }
    }
}
